<template>
  <div class="flex flex-col p-3 bg-white divide-y rounded dark:bg-regal-dark">
    <div class="flex items-center justify-between h-12 px-2">
      <div class="text-gray-700">操作系统</div>
      <el-tag>{{ server.os }}</el-tag>
    </div>
    <div class="flex items-center justify-between h-12 px-2">
      <div class="text-gray-700">PHP 版本</div>
      <el-tag>{{ server.php }}</el-tag>
    </div>
    <div class="flex items-center justify-between h-12 px-2">
      <div class="text-gray-700">MySQL 版本</div>
      <el-tag>{{ server.mysql }}</el-tag>
    </div>
    <div class="flex items-center justify-between h-12 px-2">
      <div class="text-gray-700">Laravel 版本</div>
      <el-tag>{{ server.laravel }}</el-tag>
    </div>
    <div class="flex items-center justify-between h-12 px-2">
      <div class="text-gray-700">CatchAdmin 版本</div>
      <el-tag>{{ server.catchadmin }}</el-tag>
    </div>
    <div class="flex items-center justify-between h-12 px-2">
      <div class="text-gray-700">Host</div>
      <el-tag>{{ server.host }}</el-tag>
    </div>
    <div class="flex items-center justify-between h-12 px-2">
      <div class="text-gray-700">支持最大内存</div>
      <el-tag>{{ server.memory_limit }}</el-tag>
    </div>
    <div class="flex items-center justify-between h-12 px-2">
      <div class="text-gray-700">最大执行时间</div>
      <el-tag>{{ server.max_execution_time }}</el-tag>
    </div>
    <div class="flex items-center justify-between h-12 px-2">
      <div class="text-gray-700">上传文件大小</div>
      <el-tag>{{ server.upload_max_filesize }}</el-tag>
    </div>
  </div>
</template>
<script lang="ts" setup>
import http from '@/support/http'
import { ref } from 'vue'
interface serve {
  os: string
  php: string
  mysql: string
  laravel: string
  catchadmin: string
  host: string
  memory_limit: string
  max_execution_time: string
  upload_max_filesize: string
}
const server = ref<serve>({
  os: '',
  php: '',
  mysql: '',
  laravel: '',
  catchadmin: '',
  host: '',
  memory_limit: '',
  max_execution_time: '',
  upload_max_filesize: ''
})
http.get('server/info').then(r => {
  server.value = r.data.data
})
</script>
